package com.spring.boot;

import com.spring.boot.entity.server.ServerEntity;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

/**
 * @author 刘骄阳
 * 2021-07-09 16:11
 */
@SpringBootApplication
@MapperScan("com.spring.boot.dao")
@EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true)
public class ApplicationStart {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(ApplicationStart.class, args);
        System.out.println("Linux系统文件上传路径: " + ServerEntity.getLinuxFileUrl());
        System.out.println("Windows系统文件上传路径: " + ServerEntity.getWindowsFileUrl());
        System.out.println("当前服务器的操作系统为: " + ServerEntity.getOsName());
        System.out.println("当前Java版本为: " + ServerEntity.getJavaVersion());
        System.out.println("当前项目端口为: " + ServerEntity.getPort());
    }
}
